import axios from 'axios'

// 获取轮播图
export function getRecommend() {
  const url = 'https://v1.itooi.cn/netease/banner'
  return axios.get(url).then((res) => {
    return Promise.resolve(res.data)
  })
}
// 获取热门歌单
export function getDiscList() {
  const url = 'https://v1.itooi.cn/netease/songList/hot'
  return axios.get(url).then((res) => {
    return Promise.resolve(res.data)
  })
}

// 获取歌单详情
export function getSongList(id) {
  const url = 'https://v1.itooi.cn/netease/songList'
  const data = {
    id: id
  }
  return axios.get(url, {
    params: data
  }).then((res) => {
    return Promise.resolve(res.data)
  })
}
